package com.vrv.vap.baseline.service.impl;

import com.vrv.vap.baseline.config.ExcelTemplateConfig;
import com.vrv.vap.baseline.entity.AssetTypeGroup;
import com.vrv.vap.baseline.mapper.AssetTypeGroupMapper;
import com.vrv.vap.baseline.service.AbstractExcelExportService;
import com.vrv.vap.baseline.util.FileOperationUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

@Service
public class AssetTypeGroupExportService extends AbstractExcelExportService<AssetTypeGroup> {
    @Autowired
    private AssetTypeGroupMapper assetTypeGroupMapper;

    @Autowired
    public AssetTypeGroupExportService(FileOperationUtil fileOperationUtil,
                                      ExcelTemplateConfig excelTemplateConfig) {
        super(fileOperationUtil, excelTemplateConfig, "asset_type_group");
    }

    @Override
    protected List<AssetTypeGroup> getAllData() {
        return assetTypeGroupMapper.selectAll();
    }

    @Override
    protected void processData(List<AssetTypeGroup> dataList, String format) throws IOException {
        // 如果需要对数据进行处理，可以在这里实现
    }

    @Override
    protected Class<AssetTypeGroup> getEntityClass() {
        return AssetTypeGroup.class;
    }
}